package com.tencent.cloud.iov.util.rx.proxy;

import io.reactivex.Observer;
import io.reactivex.functions.Consumer;

/**
 * {@link Observer#onNext(Object)} 代理类
 *
 * @author showxiao
 * @date 2018/3/30
 */

public class NextConsumerProxy<T> implements Consumer<T> {

    public final Observer<T> mObserver;

    public NextConsumerProxy(Observer<T> observer) {
        mObserver = observer;
    }

    @Override
    public void accept(T t) throws Exception {
        mObserver.onNext(t);
    }
}
